//实例化Vue对象
new Vue({
    el:"#vue-app",
    data:{
        inputname:true,
        name:"",
        imgkill:false,
        blood:100,
        imgsrc:"huoz.png",
        text:true,
        k_button:true,
        r_button:false,
    },
    methods:{
        showinput:function () {
            return this.inputname = !this.inputname,this.imgkill = !this.imgkill;
        },
        kill:function () {
            this.blood -= 20;
            if (this.blood == 0){
                this.imgsrc="goudai.png";
                this.text=false;
                this.k_button=false;
                this.r_button=true;
            }
        },
        reset:function () {
            this.imgkill=false;
            this.blood=100;
            this.inputname=true;
            this.text=true;
            this.k_button=true;
            this.r_button=false;
            this.imgsrc="huoz.png";
            this.name="";
        }
    },
    computed:{

    }
});